local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
local fmt = require("luasnip.extras.fmt").fmt

ls.add_snippets("markdown", {
  -- Table Heading
  s("th", fmt([[
| {} | {} |
|-|-|
{}]], {i(1, "Key"), i(2, "Value"), i(0)})),

  -- Table Row
  s("tr", fmt([[
| {} | {} |
{}]], {i(1, "Term"), i(2, "Definition"), i(0)})),

  -- Line break
  s("br", fmt("<br /> {}", {i(0)})),
})
